<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css选择器</title>
    <!-- 内嵌式 -->
    <style>
        /* 标签选择器 */
        div {
            color: red
        }

        /* 类选择器 */
        .bule {
            color: blue;
        }

        /* 层级选择器 */
        div div {
            color: aqua;
        }

        div .buleviolet {
            color: blueviolet;
        }

        /* id选择器 */
        #itcast {
            color: chocolate;
        }

        /* 组选择器 */
        .box1, .box2, .box3 {
            width: 100px;
            height: 100px;
        }

        .box1 {
            background: coral;
        }

        .box2 {
            background: cadetblue;
        }

        .box3 {
            background: deeppink;
        }

        /* 伪类选择器 */
        .box1:hover {
            width: 200px;
            height: 200px;
        }
    </style>
</head>
<body>
<div>itcast</div>
<div id="itcast">itcast</div>
<div>
    <p class="bule">heima</p>
    <ul>
        <li>
            <div class="buleviolet">hello</div>
        </li>
        <li>
            <div>world</div>
        </li>
    </ul>
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
</div>
</body>
</html>